<template>
	<view class="postDetails">
		<view class="postItem">
			<view class="postItemUser dis">
				<view class="PIUL dis">
					<view class="PIULT">
						<image :src="postItem.avatar" mode="aspectFill"></image>
					</view>
					<view class="PIULUN">
						<view class="PIULN">{{ postItem.nickname }}</view>
						<view class="PIULLV">{{ postItem.LVNum }}</view>
					</view>
				</view>
				<view class="PIUR dis">
					<view class="PIURP" v-if="isHaveWay" @click="openConWayFun(1)">
						<image src="/post/static/9.png" mode="heightFix"></image>
					</view>
					<view class="PIURT">
						{{ postItem.createTime }}
					</view>
					<view class="PIURM" @click="postOperate(0)">
						<image src="/post/static/11.png" mode=""></image>
					</view>
				</view>
			</view>
			<view class="warning ellipsis" v-if="isAdminS == 1 && postItem.riskWords != null && postItem.riskWords != ''">该贴敏感词：{{ postItem.riskWords }}</view>
			<view class="postItemConT dis">
				<view class="posType dis">
					<image v-if="postItem.isTop == 1" class="postTypeI" src="/pages/static/2.png" mode="scaleToFill"></image>
					<image v-if="postItem.isDigest == 1" class="postTypeI" src="/pages/static/3.png" mode="scaleToFill"></image>
					<image v-if="postItem.isHot == 1" class="postTypeH" src="/pages/static/1.png" mode="scaleToFill"></image>
				</view>
				<text v-if="postItem.title" class="posCon" :class="[`TI${postItem.isTHD}`]">{{ postItem.title }}</text>
				<view v-else class="posConS"></view>
			</view>
			<view class="postItemConC">
				<text class="postItemConCV">{{ postItem.content }}</text>
			</view>
			<view class="postItemImg dis" v-if="postItem.imageUrls?.length > 0">
				<view class="postItemImgD" @click="previewImg(postItem.imageUrls, index)" v-for="(imgEle, index) in postItem.imageUrls" :key="index">
					<image :src="imgEle" mode="aspectFill"></image>
				</view>
			</view>
			<!-- <view class="adminBut1 dis">
				<view class="adminBT" v-if="postpermission == 1 || postpermission == 2 || postpermission == 3" @click="openSheet(1)">管理帖子</view>
				<view class="adminBU" v-if="postpermission == 2" @click="openSheet(2)">管理用户</view>
			</view> -->
			<view class="postItembot dis">
				<view class="pIBL dis">
					<view class="pIBL1">{{ postItem.plateName }}</view>
					<view class="pIBL2">{{ postItem.viewNum }}人围观</view>
				</view>
				<view class="pIBR dis">
					<view class="pIBRI dis" @click="topRuleClick">
						<view class="pIBRII">
							<image src="/post/static/10.png" mode=""></image>
						</view>
						<view class="pIBRIT">帮顶</view>
					</view>
					<view class="pIBRI dis" @click="goShare(postItem.id)">
						<view class="pIBRII">
							<image src="/pages/static/7.png" mode=""></image>
						</view>
						<view class="pIBRIT">分享</view>
					</view>
					<view class="pIBRI dis" @click="likePostFun">
						<view class="pIBRII">
							<image src="/pages/static/5.png" mode=""></image>
						</view>
						<view class="pIBRIT">点赞{{ postItem.likeNum }}</view>
					</view>
					<view class="pIBRI dis" @click="watchPostFun">
						<view class="pIBRII">
							<image src="/post/static/13.png" mode=""></image>
						</view>
						<view class="pIBRIT">插眼</view>
					</view>
				</view>
			</view>
			<view class="hotspot">
				<view class="hotspotTit dis">
					<view class="hotspotTitL">
						<image src="/pages/static/1.png" mode=""></image>
					</view>
					<view class="hotspotTitR">今日热帖</view>
				</view>
				<view class="hotspotConDom">
					<view class="hotspotCon" :class="animate ? 'marginTopTrue' : 'marginTopFalse'">
						<view class="hotspotItem ellipsis" @click="hotspotItem(item)" v-for="item in hotList" :key="item.id">{{ item.content }}</view>
					</view>
				</view>
			</view>
		</view>
		<!-- <view class="postAdv">
			<view class="postAdvItem dis">
				<view class="adL dis">
					<view class="adLT">头像</view>
					<view class="adLR dis">
						<view class="adLRT">校园交流群</view>
						<view class="adLRB">12条信息</view>
					</view>
				</view>
				<view class="adR">查看消息</view>
			</view>
			<view class="postAItem"></view>
			<view class="postAItem"></view>
		</view> -->
		<view class="remark">
			<view class="remarkTit dis">
				<view class="remarkTitL">评论 {{ postCountNum }}</view>
				<view class="remarkTitR dis">
					<view class="rHotI">
						<image v-if="orderType == 'latest'" src="/post/static/12.png" mode=""></image>
						<image v-else src="/post/static/16.png" mode=""></image>
					</view>
					<view class="rHotT" :class="orderType == 'latest' ? 'act' : ''" @click="orderTypeChange('latest')">最新</view>
					<view class="rHI">|</view>
					<view class="rHotI">
						<image v-if="orderType == 'hot'" src="/post/static/15.png" mode=""></image>
						<image v-else src="/post/static/14.png" mode=""></image>
					</view>
					<view class="rHotT" :class="orderType == 'hot' ? 'act' : ''" @click="orderTypeChange('hot')">最热</view>
				</view>
			</view>
			<view class="remarkList">
				<view class="remarkItem borB" v-if="!!remarkTopId">
					<view class="rIUser dis">
						<view class="rIUserL dis">
							<view class="rIUserLA">
								<image :src="remarkTop?.newAvatarUrl" mode="aspectFill"></image>
							</view>
							<view class="rIUserLI">
								<view class="rIUserLIName">
									{{ remarkTop.newNickname }}
									<text class="isAuthorD" v-if="postAuthorId == remarkTop?.poster?.id">作者</text>
								</view>
								<view class="rIUserLILV">LV.{{ remarkTop.LVVal }}</view>
							</view>
						</view>
						<view class="rIUserR dis">
							<view class="rIURZ dis" @click="postMsgLikeFun(remarkTop, remarkTop.id, 1)">
								<view class="rIURZI">
									<image src="/pages/static/5.png" mode=""></image>
								</view>
								<view class="rIURZN">{{ remarkTop.likeNum }}</view>
							</view>
							<view class="rIURM" @click="postOperate(remarkTop.id)">
								<image src="/post/static/11.png" mode=""></image>
							</view>
						</view>
					</view>
					<view class="rICon">
						<view class="rIConT">{{ remarkTop.content }}</view>
						<view class="rIConI" v-if="remarkTop.imageUrl" @click="lookImg(remarkTop.imageUrl)">
							<image :src="remarkTop.imageUrl" mode="aspectFill"></image>
						</view>
						<view class="rTime dis">
							<view class="timeVal">{{ remarkTop.createTime }}</view>
							<view class="reply" @click="ReplyFun(remarkTop, 1)">回复</view>
						</view>
					</view>
					<!-- 回复评论 -->
					<view class="rCList" v-if="remarkTop?.commentReplys?.length > 0">
						<template v-for="ele in remarkTop.commentReplys" :key="ele.id">
							<view class="rCItem">
								<view class="rIUser dis">
									<view class="rIUserL dis">
										<view class="rIUserLA">
											<image :src="ele.newAvatarUrl" mode="aspectFill"></image>
										</view>
										<view class="rIUserLI">
											<view class="rIUserLIName">
												{{ ele.newNickname }}
												<text class="isAuthorD" v-if="postAuthorId == ele.poster.id">作者</text>
											</view>
											<view class="rIUserLILV">LV.{{ ele.LVVal }}</view>
										</view>
									</view>
									<view class="rIUserR dis">
										<view class="rIURZ dis" @click="postMsgLikeFun(remarkTop, ele.id, ele)">
											<view class="rIURZI">
												<image src="/pages/static/5.png" mode=""></image>
											</view>
											<view class="rIURZN">{{ ele.likeNum }}</view>
										</view>
										<view class="rIURM" @click="postOperate(ele.id)">
											<image src="/post/static/11.png" mode=""></image>
										</view>
									</view>
								</view>
								<view class="rCICon">
									<view class="rICon">
										<view class="rIConT">
											<text v-if="ele.beCommentRespondent">
												对
												<text style="color: #1b9aee">{{ ele.beCommentRespondent.nickname }}</text>
												回复：
											</text>
											{{ ele.content }}
										</view>
										<view class="rIConI" v-if="ele.imageUrl" @click="lookImg(ele.imageUrl)">
											<image :src="ele.imageUrl" mode="aspectFill"></image>
										</view>
										<view class="rTime dis">
											<view class="timeVal">{{ ele.createTime }}</view>
											<view class="reply" @click="ReplyFun(ele, 2)">回复</view>
										</view>
									</view>
								</view>
							</view>
						</template>
						<view class="rCItemMore dis" v-if="item.commentReplys.length >= 3" @click="lookMoreR(item)">
							查看{{ item.commentReplyNum }}条回复
							<up-icon name="arrow-right" color="#999" size="15"></up-icon>
						</view>
					</view>
				</view>
				<view class="remarkItem" v-for="item in remarkData" :key="item.id">
					<view class="rIUser dis">
						<view class="rIUserL dis">
							<view class="rIUserLA">
								<image :src="item.newAvatarUrl" mode="aspectFill"></image>
							</view>
							<view class="rIUserLI">
								<view class="rIUserLIName">
									{{ item.newNickname }}
									<text class="isAuthorD" v-if="postAuthorId == item.poster.id">作者</text>
								</view>
								<view class="rIUserLILV">LV.{{ item.LVVal }}</view>
							</view>
						</view>
						<view class="rIUserR dis">
							<view class="rIURZ dis" @click="postMsgLikeFun(item, item.id, 1)">
								<view class="rIURZI">
									<image src="/pages/static/5.png" mode=""></image>
								</view>
								<view class="rIURZN">{{ item.likeNum }}</view>
							</view>
							<view class="rIURM" @click="postOperate(item.id)">
								<image src="/post/static/11.png" mode=""></image>
							</view>
						</view>
					</view>
					<view class="rICon">
						<view class="rIConT">{{ item.content }}</view>
						<view class="rIConI" v-if="item.imageUrl" @click="lookImg(item.imageUrl)">
							<image :src="item.imageUrl" mode="aspectFill"></image>
						</view>
						<view class="rTime dis">
							<view class="timeVal">{{ item.createTime }}</view>
							<view class="reply" @click="ReplyFun(item, 1)">回复</view>
						</view>
					</view>
					<!-- 回复评论 -->
					<view class="rCList" v-if="item.commentReplys.length > 0">
						<template v-for="ele in item.commentReplys" :key="ele.id">
							<view class="rCItem">
								<view class="rIUser dis">
									<view class="rIUserL dis">
										<view class="rIUserLA">
											<image :src="ele.newAvatarUrl" mode="aspectFill"></image>
										</view>
										<view class="rIUserLI">
											<view class="rIUserLIName">
												{{ ele.newNickname }}
												<text class="isAuthorD" v-if="postAuthorId == ele.poster.id">作者</text>
											</view>
											<view class="rIUserLILV">LV.{{ ele.LVVal }}</view>
										</view>
									</view>
									<view class="rIUserR dis">
										<view class="rIURZ dis" @click="postMsgLikeFun(item, ele.id, ele)">
											<view class="rIURZI">
												<image src="/pages/static/5.png" mode=""></image>
											</view>
											<view class="rIURZN">{{ ele.likeNum }}</view>
										</view>
										<view class="rIURM" @click="postOperate(ele.id)">
											<image src="/post/static/11.png" mode=""></image>
										</view>
									</view>
								</view>
								<view class="rCICon">
									<view class="rICon">
										<view class="rIConT">
											<text v-if="ele.beCommentRespondent">
												对
												<text style="color: #1b9aee">{{ ele.beCommentRespondent.nickname }}</text>
												回复：
											</text>
											{{ ele.content }}
										</view>
										<view class="rIConI" v-if="ele.imageUrl" @click="lookImg(ele.imageUrl)">
											<image :src="ele.imageUrl" mode="aspectFill"></image>
										</view>
										<view class="rTime dis">
											<view class="timeVal">{{ ele.createTime }}</view>
											<view class="reply" @click="ReplyFun(ele, 2)">回复</view>
										</view>
									</view>
								</view>
							</view>
						</template>
						<view class="rCItemMore dis" v-if="item.commentReplys.length >= 3" @click="lookMoreR(item)">
							查看{{ item.commentReplyNum }}条回复
							<up-icon name="arrow-right" color="#999" size="15"></up-icon>
						</view>
					</view>
				</view>
				<view class="skeleton" v-if="remarkData.length < total || request">
					<up-skeleton rows="3" title loading></up-skeleton>
				</view>
				<view class="noData p20" v-else>没有更多内容了，亲~</view>
			</view>
		</view>
		<view class="msgInput dis">
			<view class="inUser">
				<image :src="curUser.avatar" mode="aspectFill"></image>
			</view>
			<view class="inText" @click="openMsgFun">{{ postItem.isEndPost == 1 ? '该帖已结束，禁止评论' : '友善评论，传递温暖' }}</view>
		</view>
		<!-- 管理按钮 -->
		<view class="adminBut" @click="adminFun">管理</view>
		<view class="nav dis">
			<view class="navItem dis" @click="openPublish">
				<view class="navIcon">
					<up-icon name="edit-pen" color="#fff" size="28"></up-icon>
				</view>
				<view class="navText">发布</view>
			</view>
			<view class="navItem dis" @click="goMessage">
				<view class="navIcon">
					<up-icon name="chat" color="#fff" size="28"></up-icon>
				</view>
				<view class="navText">消息</view>
			</view>
			<view class="navItem dis" @click="goIndex">
				<view class="navIcon">
					<up-icon name="home" color="#fff" size="28"></up-icon>
				</view>
				<view class="navText">首页</view>
			</view>
		</view>
		<!-- 导航 -->
		<up-popup :show="show" :round="10" mode="bottom" @close="close" @open="open">
			<view class="popupDom">
				<view class="popupDomCh">
					<view class="titleP">选择发布类型</view>
					<view class="pushList p20">
						<view class="pushItem p20 dis" @click="goPublish(1)">
							<view class="pushItemL dis">
								<view class="pItemL">
									<image src="/static/pen.png" mode="widthFix"></image>
								</view>
								<view class="pItemR dis">
									<view class="pItemRT">发布帖子</view>
									<view class="pItemRB">发布分享校园实况</view>
								</view>
							</view>
							<view class="pushItemR">
								<up-icon name="arrow-right"></up-icon>
							</view>
						</view>
						<view class="pushItem p20 dis colorP" @click="goErrand">
							<view class="pushItemL dis">
								<view class="pItemL">
									<image src="/static/run.png" mode="widthFix"></image>
								</view>
								<view class="pItemR dis">
									<view class="pItemRT">跑腿/互助</view>
									<view class="pItemRB">发布悬赏，请同学帮忙跑腿等</view>
								</view>
							</view>
							<view class="pushItemR">
								<up-icon name="arrow-right"></up-icon>
							</view>
						</view>
						<view class="pushItem p20 dis colorC" @click="goPublish(3)">
							<view class="pushItemL dis">
								<view class="pItemL">
									<image src="/static/msg.png" mode="widthFix"></image>
								</view>
								<view class="pItemR dis">
									<view class="pItemRT">进入超级话题</view>
									<view class="pItemRB">付费或参与其他校园超级话题</view>
								</view>
							</view>
							<view class="pushItemR">
								<up-icon name="arrow-right"></up-icon>
							</view>
						</view>
					</view>
				</view>
				<view class="closeP" @click="close">取消</view>
			</view>
		</up-popup>
		<!-- 评论 -->
		<up-popup :show="showMsg" :round="10" mode="bottom" @close="closeMsg" @open="openMsg">
			<view class="popMsg">
				<view class="popMsgI dis">
					<view class="pMIL">匿名评论：</view>
					<view class="pMIR"><up-switch v-model="anonymity" activeColor="#5ac725"></up-switch></view>
				</view>
				<view class="msgVal p20">
					<view class="textVal">
						<textarea v-model="msgVal" placeholder="写下你想说的话" />
					</view>
					<view class="msgImg dis" v-if="msgImg" style="overflow: hidden">
						<image :src="msgImg" mode="aspectFill"></image>
						<view class="offImg" @click.stop="delImg">x</view>
					</view>
					<view class="msgImg dis" v-else @click="uploadImg">
						<up-icon name="plus" color="#dcdee0" size="28"></up-icon>
					</view>
				</view>
				<view class="VestList dis" v-show="vest">
					<view class="VestItem dis" v-for="item in VestList" :key="item.id" :class="vestID == item.id ? 'VestACtive' : ''" @click="vestClick(item)">
						<view class="VestI">
							<image :src="item.vestAvatar" mode="aspectFill"></image>
						</view>
						<view class="VestName">{{ item.vestNickname }}</view>
					</view>
				</view>
				<view class="popMsgII dis">
					<view class="popMsgIIL dis">
						<view class="pMIL">我的马甲：</view>
						<view class="pMIR"><up-switch v-model="vest" @change="vestChange" activeColor="#5ac725"></up-switch></view>
					</view>
					<view class="popMsgIIR" :class="msgVal ? 'MsgActive' : ''" @click="sendMsg">发送</view>
				</view>
			</view>
		</up-popup>
		<!-- 管理帖子 -->
		<up-action-sheet
			:actions="sheetOptions"
			:title="sheetTit"
			:show="sheetShow"
			:round="15"
			@select="selectSheet"
			:closeOnClickOverlay="true"
			@close="closeSheet"
			cancelText="取消"
		></up-action-sheet>
		<!-- 举报 -->
		<up-popup :show="reportShow" :round="10" mode="bottom" @close="closeRep" @open="openRepA">
			<view class="report">
				<view class="repTit">举报{{ radioType == 0 ? '帖子' : '评论' }}</view>
				<view class="repRadio p20">
					<up-radio-group v-model="radioVal" placement="row" @change="radioChange">
						<up-radio v-for="(item, index) in radiolist1" :key="index" :label="item.label" :name="item.name"></up-radio>
					</up-radio-group>
				</view>
				<view class="reportVal p20">
					<textarea v-model="reportVal" placeholder="请输入更多举报描述" />
				</view>
				<view class="reportBut dis p20">
					<view class="butR" @click="radioOk">提交</view>
				</view>
			</view>
		</up-popup>
		<!-- 联系方式 -->
		<up-popup :show="conWayShow" :round="10" mode="bottom" @close="closeWay" @open="openConWay">
			<view class="contactWay">
				<view class="wayTit dis">
					<view class="wayTL" @click="closeWay">
						<u-icon name="close" color="#999" size="27"></u-icon>
					</view>
					<view class="wayTC">联系方式</view>
					<view class="wayTR" @click="copyConWay">一键复制</view>
				</view>
				<view class="wayCon">
					<view class="wayConItem dis">
						<view class="wCIL">联系姓名：</view>
						<view class="wCIR">{{ conWayData.contactName }}</view>
					</view>
					<view class="wayConItem dis">
						<view class="wCIL">{{ conWayData.contactTit }}</view>
						<view class="wCIR" @click="makePhoneCall(conWayData.contactVal)">{{ conWayData.contactVal }}</view>
					</view>
				</view>
			</view>
		</up-popup>
		<!-- 更多评论 -->
		<up-popup :show="replyShow" :round="10" mode="bottom" @close="closeLook" @open="lookMoreRA">
			<scroll-view class="replyShow p20" scroll-y>
				<view class="remarkItem">
					<view class="rIUser dis">
						<view class="rIUserL dis">
							<view class="rIUserLA">
								<image :src="replyMoreData?.newAvatarUrl" mode="aspectFill"></image>
							</view>
							<view class="rIUserLI">
								<view class="rIUserLIName">
									{{ replyMoreData?.newNickname }}
									<text class="isAuthorD" v-if="postAuthorId == replyMoreData?.poster.id">作者</text>
								</view>
								<view class="rIUserLILV">LV.{{ replyMoreData?.LVVal }}</view>
							</view>
						</view>
						<view class="rIUserR dis">
							<view class="rIURZ dis" @click="postMsgLikeFun(replyMoreData, replyMoreData.id, 1)">
								<view class="rIURZI">
									<image src="/pages/static/5.png" mode="aspectFill"></image>
								</view>
								<view class="rIURZN">{{ replyMoreData?.likeNum }}</view>
							</view>
							<view class="rIURM">
								<image src="/post/static/11.png" mode=""></image>
							</view>
						</view>
					</view>
					<view class="rICon">
						<view class="rIConT">{{ replyMoreData?.content }}</view>
						<view class="rIConI" v-if="replyMoreData?.imageUrl" @click="lookImg(replyMoreData.imageUrl)">
							<image :src="replyMoreData?.imageUrl" mode="aspectFill"></image>
						</view>
						<view class="rTime dis">
							<view class="timeVal">{{ replyMoreData?.createTime }}</view>
							<view class="reply" @click="ReplyFun(replyMoreData, 1)">回复</view>
						</view>
					</view>
					<!-- 回复评论 -->
					<view class="rCList" v-if="replyMoreList.length > 0">
						<template v-for="ele in replyMoreList" :key="ele.id">
							<view class="rCItem">
								<view class="rIUser dis">
									<view class="rIUserL dis">
										<view class="rIUserLA">
											<image :src="ele.newAvatarUrl" mode="aspectFills"></image>
										</view>
										<view class="rIUserLI">
											<view class="rIUserLIName">
												{{ ele.newNickname }}
												<text class="isAuthorD" v-if="postAuthorId == ele.poster.id">作者</text>
											</view>
											<view class="rIUserLILV">LV.{{ ele.LVVal }}</view>
										</view>
									</view>
									<view class="rIUserR dis">
										<view class="rIURZ dis" @click="postMsgLikeFun(replyMoreData, ele.id, ele)">
											<view class="rIURZI">
												<image src="/pages/static/5.png" mode=""></image>
											</view>
											<view class="rIURZN">{{ ele.likeNum }}</view>
										</view>
										<view class="rIURM">
											<image src="/post/static/11.png" mode=""></image>
										</view>
									</view>
								</view>
								<view class="rCICon">
									<view class="rICon">
										<view class="rIConT">
											<text v-if="ele.beCommentRespondent">
												对
												<text style="color: #1b9aee">{{ ele.beCommentRespondent.nickname }}</text>
												回复：
											</text>
											{{ ele.content }}
										</view>
										<view class="rIConI" v-if="ele.imageUrl" @click="lookImg(ele.imageUrl)">
											<image :src="ele.imageUrl" mode="aspectFill"></image>
										</view>
										<view class="rTime dis">
											<view class="timeVal">{{ ele.createTime }}</view>
											<view class="reply" @click="ReplyFun(ele, 2)">回复</view>
										</view>
									</view>
								</view>
							</view>
						</template>
					</view>
				</view>
			</scroll-view>
		</up-popup>
		<!-- 用户确认弹窗 -->
		<up-modal :content="contentVal" title="提示" :show="showModal" contentTextAlign="center" confirmButtonShape="circle">
			<template #confirmButton>
				<view class="custom_btn" @click="modalOk">确定</view>
			</template>
		</up-modal>
		<!-- 用户风险等级设置 -->
		<up-popup :show="riskShow" :round="10" mode="bottom" @close="closeRisk" @open="riskShowA">
			<view class="report riskClass">
				<view class="repTit">用户风险等级设置</view>
				<view class="repRadio p20">
					<up-radio-group v-model="riskVal" placement="column">
						<up-radio v-for="(item, index) in riskList" :key="index" :label="item.label" :name="item.name"></up-radio>
					</up-radio-group>
				</view>
				<view class="reportBut dis p20">
					<view class="butR" @click="riskOKFun">提交</view>
				</view>
			</view>
		</up-popup>
		<!-- 用户禁言 -->
		<up-popup :show="banShow" :round="10" mode="bottom" @close="closeBan" @open="banShowA">
			<view class="report riskClass">
				<view class="repTit">用户禁言</view>
				<view class="repRadio p20">
					<up-radio-group v-model="banVal" placement="row">
						<up-radio v-for="(item, index) in banList" :key="index" :label="item.label" :name="item.name"></up-radio>
					</up-radio-group>
				</view>
				<view class="reportVal p20">
					<textarea v-model="banValCon" placeholder="请输入禁言备注" />
				</view>
				<view class="repRadio p20">
					<up-radio-group v-model="banValT" placement="row">
						<up-radio v-for="(item, index) in banTiem" :key="index" :label="item.label" :name="item.name"></up-radio>
					</up-radio-group>
				</view>
				<view class="reportBut dis p20">
					<view class="butR" @click="banOKFun">提交</view>
				</view>
			</view>
		</up-popup>
	</view>
</template>

<script setup>
import {
	getMessageInfo,
	userBan,
	userRisk,
	setSelected,
	setOrUnsetHot,
	postGoTop,
	endPost,
	offRemark,
	deletePost,
	deleteRemark,
	postMsgLike,
	topSupport,
	topRule,
	threadInfo,
	hotPost,
	postCount,
	remarkList,
	replyItem,
	postMsgAdd,
	userVest,
	likePost,
	watchPost,
	report,
	reportRemark,
	statisticsWebsitePVandUV
} from '@/config/api.js';
import { adminPost, adminMore, adminList, adminReply, ordinaryUser, postAdminPosterThis, postAdminPoster, ordinaryReply, postReply, adminUser } from '@/config/sheetOption.js';
import { ref } from 'vue';
import { onShow, onLoad, onReachBottom } from '@dcloudio/uni-app';
import { dealWithDataItem, timeago, uploadImage } from '@/util/util.js';
const DEFAULT_NICKNAME = '一位神秘的校友';
const DEFAULT_AVATAR = 'https://www.xiaoyixing.cn/upload/c942f403563c4e18a0f621cbf098f74d.jpg';
const postId = ref('');
const remarkTopId = ref(0);
onShow(() => {
	console.log('onShow');
});
onLoad((options) => {
	postId.value = options.id;
	remarkTopId.value = options.remarkId;
	statisticsWebsitePVandUV();
	// const schoolStr = uni.getStorageSync('schoolInfo')
	// if (schoolStr) {
	// 	const school = JSON.parse(schoolStr)
	// 	schoolInfo.value = school
	// 	uni.setNavigationBarTitle({
	// 		title: school.schoolName + '校话'
	// 	})
	// }
	getItem(); //获取帖子
	getHotList();
	if (!!remarkTopId.value) {
		getMessageInfoFun();
	}
});

const goErrand = () => {
	close();
	uni.navigateTo({
		url: `/errand/publish/publish`
	});
};

// 帖子操作 num 0帖子 不是0评论ＩＤ
const postOperateVal = ref(0);
const postOperate = (num) => {
	// console.log(userType.value);
	postOperateVal.value = num;
	const list = userType.value == 1 ? '管理员' : userType.value == 2 ? '作者' : '访客';
	if (num == 0) {
		if (userType.value == 0) {
			openSheet(11, ordinaryUser);
		} else if (userType.value == 2) {
			openSheet(12, postAdminPoster);
		} else {
			openSheet(12, postAdminPoster);
		}
	} else {
		// openSheet(16, adminReply);
		if (userType.value == 0) {
			openSheet(14, ordinaryReply);
		} else if (userType.value == 2) {
			openSheet(15, postReply);
		} else {
			openSheet(16, adminReply);
		}
	}
};

// 管理员按钮
const adminFun = () => {
	openSheet(17, adminList);
};

// 结束帖子
const endPostFun = async () => {
	const res = await endPost(postId.value, {});
	if (res.code == 0) {
		closeRep();
		uni.showToast({
			title: '操作成功',
			icon: 'none'
		});
	} else {
		uni.showToast({
			title: res.message,
			icon: 'none'
		});
	}
};
// 关闭评论推送
const offRemarkFun = async () => {
	const res = await offRemark(postId.value, {});
	if (res.code == 0) {
		closeRep();
		uni.showToast({
			title: '操作成功',
			icon: 'none'
		});
	} else {
		uni.showToast({
			title: res.message,
			icon: 'none'
		});
	}
};

// 删除该帖
const deletePostFun = async (data) => {
	const res = await deletePost(postId.value, data);
	if (res.code == 0) {
		closeRep();
		uni.showToast({
			title: '删除成功',
			icon: 'none'
		});
	} else {
		uni.showToast({
			title: res.message,
			icon: 'none'
		});
	}
};

// 删除该评论
const deleteRemarkFun = async (remarkId, data) => {
	const res = await deleteRemark(remarkId, data);
	// console.log(res);
	if (res.code == 0) {
		closeRep();
		uni.showToast({
			title: '删除成功',
			icon: 'none'
		});
		pageNum.value = 1;
		remarkData.value = [];
		remarkListFun(orderType.value);
		closeMsg();
	} else {
		uni.showToast({
			title: res.message,
			icon: 'none'
		});
	}
};

// 举报帖子
const reportFun = async (data) => {
	const res = await report(postId.value, data);
	if (res.code == 0) {
		closeRep();
		uni.showToast({
			title: '举报成功',
			icon: 'none'
		});
	} else {
		uni.showToast({
			title: res.message,
			icon: 'none'
		});
	}
};

// 举报评论
const reportRemarkFun = async (remarkId, data) => {
	const res = await reportRemark(remarkId, data);
	// console.log(res);
	if (res.code == 0) {
		closeRep();
		uni.showToast({
			title: '举报成功',
			icon: 'none'
		});
	} else {
		uni.showToast({
			title: res.message,
			icon: 'none'
		});
	}
};
// 管理员帖子置顶
const postGoTopFun = async () => {
	const res = await postGoTop(postId.value, {});
	if (res.code == 0) {
		postItem.value.isTop = postItem.value.isTop == 0 ? 1 : 0;
		closeRep();
		uni.showToast({
			title: '操作成功',
			icon: 'none'
		});
	} else {
		uni.showToast({
			title: res.message,
			icon: 'none'
		});
	}
};
// 加精或取消加精
const setSelectedFun = async () => {
	const res = await setSelected(postId.value, {});
	if (res.code == 0) {
		postItem.value.isDigest = postItem.value.isDigest == 0 ? 1 : 0;
		closeRep();
		uni.showToast({
			title: '操作成功',
			icon: 'none'
		});
	} else {
		uni.showToast({
			title: res.message,
			icon: 'none'
		});
	}
};
// 设置为火帖
const setOrUnsetHotFun = async () => {
	const res = await setOrUnsetHot(postId.value, {});
	if (res.code == 0) {
		postItem.value.isHot = postItem.value.isHot == 0 ? 1 : 0;
		closeRep();
		uni.showToast({
			title: '操作成功',
			icon: 'none'
		});
	} else {
		uni.showToast({
			title: res.message,
			icon: 'none'
		});
	}
};

// 用户确认弹窗
const openModal = (con, fun) => {
	contentVal.value = con;
	currentCallback.value = fun;
	showModal.value = true;
};
const currentCallback = ref(null);
const showModal = ref(false);
const contentVal = ref('');
const modalOk = async () => {
	showModal.value = false;
	if (currentCallback.value) {
		await currentCallback.value(); // 执行动态传入的回调
	}
};

// 帮顶
const topRuleList = ref([]);
const getTopRule = async () => {
	const res = await topRule();
	if (res.code == 0) {
		const newList = res.data.list.map((item) => {
			const name = `置顶${item.topDuration}小时，${item.money}元`;
			return {
				...item,
				name
			};
		});
		openSheet(3, newList);
	}
};
const topRuleClick = () => {
	getTopRule();
};
// 选择置顶时间
const topSupportFun = async (item) => {
	const res = await topSupport(postId.value, { topRuleId: item.id });
	console.log(res);
};
// 帖子插眼
const watchPostFun = async () => {
	let action = 1;
	if (postItem.value.isWatched == 1) {
		// 取消点赞
		action = 2;
	} else {
		// 点赞
		action = 1;
	}
	const res = await watchPost(postId.value, { action });
	if (res.code == 0) {
		postItem.value.isWatched = postItem.value.isWatched == 1 ? 0 : 1;
	}
};
// 帖子点赞
const likePostFun = async () => {
	let action = 1;
	if (postItem.value.isLiked == 1) {
		// 取消点赞
		action = 2;
	} else {
		// 点赞
		action = 1;
	}
	const res = await likePost(postId.value, { action });
	if (res.code == 0) {
		postItem.value.isLiked = postItem.value.isLiked == 1 ? 0 : 1;
		postItem.value.likeNum = action == 1 ? postItem.value.likeNum + 1 : postItem.value.likeNum - 1;
	}
};

// 管理帖子
// sheetType 1是管理帖子 2是管理用户 3帮忙置顶
const sheetType = ref(1);
const clickItem = ref(0);
const sheetShow = ref(false);
const sheetTit = ref('管理帖子');
const sheetOptions = ref([]);
const openSheet = (val, list) => {
	if (val == 1) {
		sheetTit.value = '管理帖子';
		sheetOptions.value = sheetTyep1;
	} else if (val == 2) {
		sheetTit.value = '管理用户';
		sheetOptions.value = sheetTyep2;
	} else if (val == 3) {
		sheetTit.value = '请选择置顶时间';
		sheetOptions.value = list;
	} else {
		sheetTit.value = '';
		sheetOptions.value = list;
	}
	sheetType.value = val;
	sheetShow.value = true;
};
const selectSheet = (index) => {
	console.log(index);
	const item = index;
	clickItem.value = item.id;
	if (sheetType.value == 3) {
		topSupportFun(index);
		closeSheet();
	} else if (sheetType.value == 11) {
		if (item.id == '01') {
			// 分享
		}
		if (item.id == '02') {
			// 复制
		}
		if (item.id == '03') {
			openRep(0);
			closeSheet();
		}
	} else if (sheetType.value == 12) {
		if (item.id == '01') {
			// 分享
		}
		if (item.id == '02') {
			// 复制
		}
		if (item.id == '05') {
			openRep(0);
			closeSheet();
		}
		if (item.id == '0401') {
			// 结束该贴
			closeSheet();
			openModal('确定要结束该帖吗？结束后，用户不可评论，但显示。', endPostFun);
		}
		if (item.id == '0402') {
			// 关闭评论推送
			closeSheet();
			openModal('确定要关闭评论推送吗？', offRemarkFun);
		}
		if (item.id == '04') {
			closeSheet();
			setTimeout(() => {
				openSheet(12, postAdminPosterThis);
			}, 200);
		}
	} else if (sheetType.value == 14) {
		if (item.id == '01') {
			// 分享
		}
		if (item.id == '02') {
			// 复制
		}
		if (item.id == '06') {
			// 回复
			closeSheet();
			remarkData.value.forEach((item) => {
				if (item.id == postOperateVal.value) {
					ReplyFun(item, 1);
				} else {
					item.commentReplys.forEach((ele) => {
						if (ele.id == postOperateVal.value) {
							ReplyFun(ele, 2);
						}
					});
				}
			});
		}
		if (item.id == '03') {
			openRep(postOperateVal.value);
			closeSheet();
		}
	} else if (sheetType.value == 15 || sheetType.value == 16) {
		if (item.id == '01') {
			// 分享
		}
		if (item.id == '02') {
			// 复制
		}
		if (item.id == '03') {
			openRep(postOperateVal.value);
			closeSheet();
		}
		if (item.id == '08') {
			openRep(postOperateVal.value);
			closeSheet();
		}
		if (item.id == '07') {
			console.log('置顶评论');
			closeSheet();
		}
		if (item.id == '10') {
			closeSheet();
			setTimeout(() => {
				openSheet(16, adminUser);
			}, 300);
		}
		if (item.id == '1005') {
			closeSheet();
			setTimeout(() => {
				riskShow.value = true;
			}, 200);
		}
		if (item.id == '1007') {
			closeSheet();
			setTimeout(() => {
				let userId = '';
				remarkData.value.forEach((item) => {
					if (item.id == postOperateVal.value) {
						userId = item.poster.id;
					} else {
						item.commentReplys.forEach((ele) => {
							if (ele.id == postOperateVal.value) {
								userId = ele.poster.id;
							}
						});
					}
				});
				uni.navigateTo({
					url: `/post/user/adminEditUser?val=${userId}`
				});
			}, 200);
		}
		if (item.id == '1004') {
			closeSheet();
			setTimeout(() => {
				banShow.value = true;
			}, 200);
		}
		if (item.id == '06') {
			// 回复
			closeSheet();
			remarkData.value.forEach((item) => {
				if (item.id == postOperateVal.value) {
					ReplyFun(item, 1);
				} else {
					item.commentReplys.forEach((ele) => {
						if (ele.id == postOperateVal.value) {
							ReplyFun(ele, 2);
						}
					});
				}
			});
		}
	} else if (sheetType.value == 17) {
		if (item.id == '05') {
			openRep(0);
			closeSheet();
		}
		if (item.id == '1201') {
			const con = postItem.value.isTop == 0 ? '确定要置顶该帖吗？' : '确定要取消置顶该帖吗？';
			openModal(con, postGoTopFun);
		}
		if (item.id == '1202') {
			const con = postItem.value.isDigest == 0 ? '确定要对该帖加精吗？' : '确定要对该帖取消加精吗？';
			openModal(con, setSelectedFun);
		}
		if (item.id == '1203') {
			const con = postItem.value.isHot == 0 ? '确定要对该帖设置为火帖吗？' : '确定要对该帖取消火帖吗？';
			openModal(con, setOrUnsetHotFun);
		}
		if (item.id == '1204') {
			console.log('帖子状态');
		}
		if (item.id == '12') {
			closeSheet();
			setTimeout(() => {
				openSheet(17, adminPost);
			}, 300);
		}
		if (item.id == '11') {
			closeSheet();
			setTimeout(() => {
				openSheet(17, adminMore);
			}, 300);
		}
		if (item.id == '10') {
			closeSheet();
			setTimeout(() => {
				openSheet(17, adminUser);
			}, 300);
		}
		if (item.id == '1005') {
			closeSheet();
			setTimeout(() => {
				riskShow.value = true;
			}, 200);
		}
		if (item.id == '1004') {
			closeSheet();
			setTimeout(() => {
				banShow.value = true;
			}, 200);
		}
		if (item.id == '1007') {
			closeSheet();
			setTimeout(() => {
				uni.navigateTo({
					url: `/post/user/adminEditUser?val=${postItem.value.author.id}`
				});
			}, 200);
		}
	}
};
const closeSheet = () => {
	sheetShow.value = false;
	sheetOptions.value = [];
	// sheetType.value = 1;
	sheetTit.value = '管理帖子';
};
const sheetTyep1 = [
	{ name: '置顶/取消置顶', id: 1 },
	{ name: '加精/取消加精', id: 2 },
	{ name: '火贴/取消火贴', id: 3 },
	{ name: '帖子仅自己可见', id: 4 },
	{ name: '删除该贴', id: 5 }
];
const sheetTyep2 = [
	{ name: '禁言此用户', id: 1 },
	{ name: '用户风险等级设置', id: 2 },
	{ name: '修改用户头像和昵称', id: 3 }
];

// 禁言用户
const banList = ref([
	{ label: '违法论坛规范', name: '违法论坛规范' },
	{ label: '涉嫌广告推销', name: '涉嫌广告推销' },
	{ label: '发布违法信息', name: '发布违法信息' },
	{ label: '辱骂诽谤他人', name: '辱骂诽谤他人' },
	{ label: '侵犯他人权益', name: '侵犯他人权益' },
	{ label: '破坏产品生态', name: '破坏产品生态' },
	{ label: '对学校会产生负面舆论', name: '对学校会产生负面舆论' }
]);
const banTiem = ref([
	{ label: '一天', name: '1' },
	{ label: '一周', name: '7' },
	{ label: '一个月', name: '30' },
	{ label: '一年', name: '365' },
	{ label: '永久', name: '9999' }
]);
const banShow = ref(false);
const banVal = ref(0);
const banValT = ref(0);
const banValCon = ref('');
const banShowA = () => {};
const closeBan = () => {
	banShow.value = false;
};
const banOKFun = async () => {
	let userId = null;
	if (sheetType.value == 17) {
		userId = postItem.value.author.id;
	} else {
		remarkData.value.forEach((item) => {
			if (item.id == postOperateVal.value) {
				userId = item.poster.id;
			} else {
				item.commentReplys.forEach((ele) => {
					if (ele.id == postOperateVal.value) {
						userId = ele.poster.id;
					}
				});
			}
		});
	}
	const data = {
		type: 'bbs',
		banReason: banVal.value,
		banRemark: banValCon.value,
		banTime: banValT.value
	};
	const res = await userBan(userId, data);
	if (res.code == 0) {
		banShow.value = false;
		uni.showToast({
			title: '操作成功',
			icon: 'none'
		});
	} else {
		uni.showToast({
			title: res.message,
			icon: 'none'
		});
	}
};

// 用户风险等级设置
const riskList = ref([
	{ label: '正常', name: '0' },
	{ label: '发帖受控', name: 'controlled_thread' },
	{ label: '评论受控', name: 'controlled_post' },
	{ label: '发帖、评论受控', name: 'controlled_thread_post' },
	{ label: '发帖、评论受控且不再审核', name: 'controlled_thread_post_no_review' },
	{ label: '禁止访问', name: '403' }
]);
const riskShow = ref(false);
const riskVal = ref(0);
const riskShowA = () => {};
const closeRisk = () => {
	riskShow.value = false;
};
const riskOKFun = async () => {
	let userId = null;
	if (sheetType.value == 17) {
		userId = postItem.value.author.id;
	} else {
		remarkData.value.forEach((item) => {
			if (item.id == postOperateVal.value) {
				userId = item.poster.id;
			} else {
				item.commentReplys.forEach((ele) => {
					if (ele.id == postOperateVal.value) {
						userId = ele.poster.id;
					}
				});
			}
		});
	}
	const data = {
		type: 'bbs',
		riskStatus: riskVal.value
	};
	const res = await userRisk(userId, data);
	if (res.code == 0) {
		riskShow.value = false;
		uni.showToast({
			title: '操作成功',
			icon: 'none'
		});
	} else {
		uni.showToast({
			title: res.message,
			icon: 'none'
		});
	}
};

// 举报
const radiolist1 = ref([
	{ label: '广告营销', name: 1 },
	{ label: '色情低俗', name: 2 },
	{ label: '恐怖暴力', name: 3 },
	{ label: '政治相关', name: 4 },
	{ label: '恶意刷级', name: 5 },
	{ label: '传播谣言', name: 6 },
	{ label: '涉嫌欺诈', name: 7 },
	{ label: '辱骂攻击', name: 8 },
	{ label: '泄露他人隐私', name: 9 },
	{ label: '其他原因', name: 10 }
]);
const reportShow = ref(false);
const radioVal = ref(0);
const reportVal = ref('');
const radioType = ref(0); //0是帖子 其余是评论ID
const closeRep = () => {
	reportShow.value = false;
	radioVal.value = 0;
	reportVal.value = '';
	radioType.value = 0;
};
const openRep = (num) => {
	radioType.value = num;
	reportShow.value = true;
};
const openRepA = () => {};
const radioChange = (val) => {
	console.log(val, '选中');
};
const radioOk = () => {
	const item = radiolist1.value.find((ele) => ele.name == radioVal.value);
	if (radioType.value == 0) {
		const data = {
			reportReason: item.label,
			reportContent: reportVal.value
		};
		if (clickItem.value == '05') {
			deletePostFun(data);
		} else {
			reportFun(data);
		}
	} else {
		const data = {
			reportReason: item.label,
			reportContent: reportVal.value
		};
		if (sheetType.value == 15) {
			deleteRemarkFun(radioType.value, data);
		} else {
			reportRemarkFun(radioType.value, data);
		}
	}
};

// 帖子
const curUser = ref({}); // 当前用户
const postSchool = ref({});
const postpermission = ref(0); // 0 举报 1管理员且是作者 2只是管理员 3作者本人
const userType = ref(0); //用户身份
const postItem = ref({});
const postAuthorId = ref(0); // 帖子作者ID
const isAdminS = ref(0); // 1管理员
const isAuthorS = ref(0); // 1作者本人
const getItem = async () => {
	const res = await threadInfo(postId.value, {});
	// console.log(res);
	if (res.code == 0) {
		postItem.value = dealWithDataItem(res.data.forumThread);
		const isAdmin = res.data.isAdmin;
		const isAuthor = res.data.isAuthor;
		const curUserId = res.data.curUser.id;
		curUser.value = res.data.curUser;
		isAdminS.value = isAdmin;
		isAuthorS.value = isAuthor;
		postAuthorId.value = res.data.forumThread.author.id;
		if (postItem.value.isDeleted == 1 && isAdmin == 1) {
			// 关闭当前页去404
		} else {
			postCountFun();
		}
		postSchool.value = {
			schoolId: postItem.value.departmentId,
			schoolName: postItem.value.departmentName
		};
		if (isAdmin == 1 && isAuthor == 1) {
			postpermission.value = 1;
			userType.value = 1;
		} else if (isAdmin == 1) {
			postpermission.value = 2;
			userType.value = 1;
		} else if (isAuthor == 1) {
			postpermission.value = 3;
			userType.value = 2;
		} else {
			postpermission.value = 0;
			userType.value = 0;
		}
		// 是否有联系方式
		if (postItem.value.contactPhone != '' || postItem.value.contactQq != '' || postItem.value.contactWechat != '') {
			isHaveWay.value = true;
		} else {
			isHaveWay.value = false;
		}
	}
};
//预览图片
const previewImg = (imgList, index) => {
	uni.previewImage({
		current: index,
		urls: imgList,
		indicator: true
	});
};

// 获取主题评论数量
const postCountNum = ref(0);
const postCountFun = async () => {
	const res = await postCount(postId.value, { departmentId: postSchool.value.schoolId, threadId: postId.value });
	// console.log(res)
	if (res.code == 0) {
		postCountNum.value = res.data.itemNum;
		remarkListFun(orderType.value);
	}
};
const orderType = ref('latest');
const pageNum = ref(1);
const pageSize = ref(10);
const total = ref(0);
const remarkData = ref([]);
const remarkTop = ref({});
const request = ref(true);
const remarkListFun = async (orderTypeS) => {
	const data = {
		pageNum: pageNum.value,
		pageSize: pageSize.value,
		departmentId: postSchool.value.schoolId,
		threadId: postId.value,
		orderTypeS
	};
	const res = await remarkList(postId.value, data);
	// console.log(res)
	if (res.code == 0) {
		const newList = res.data.pageInfo.list.map((item) => {
			item.newAvatarUrl = item.isAnonymous == 1 ? (item.vestAvatar == null ? DEFAULT_AVATAR : item.vestAvatar) : item.poster.avatar;
			item.newNickname = item.isAnonymous == 1 ? (item.vestNickname == null ? DEFAULT_NICKNAME : item.vestNickname) : item.poster.nickname;
			item.LVVal = item.poster.usergroup.level + item.poster.usergroup.groupTitle;
			item.createTime = timeago(item.createTime);
			if (item.commentReplys.length > 0) {
				item.commentReplys.forEach((ele) => {
					ele.newAvatarUrl = ele.isAnonymous == 1 ? (ele.vestAvatar == null ? DEFAULT_AVATAR : ele.vestAvatar) : ele.poster.avatar;
					ele.newNickname = ele.isAnonymous == 1 ? (ele.vestNickname == null ? DEFAULT_NICKNAME : ele.vestNickname) : ele.poster.nickname;
					ele.LVVal = ele.poster.usergroup.level + ele.poster.usergroup.groupTitle;
					ele.createTime = timeago(ele.createTime);
				});
			}
			return {
				...item
			};
		});
		remarkData.value = [...remarkData.value, ...newList];
		total.value = res.data.pageInfo.total;
		request.value = false;
		// console.log(newList);
	}
};
const lookImg = (url) => {
	if (replyShow.value) {
		replyShow.value = false;
	}
	uni.previewImage({
		urls: [url],
		indicator: true
	});
};
// 查看更多评论
const replyMoreData = ref(null);
const replyMoreList = ref([]);
const replyShow = ref(false);
const lookMoreR = async (item) => {
	replyMoreData.value = item;
	const res = await replyItem(item.id, {});
	if (res.code == 0) {
		const newList = res.data.list.map((item) => {
			item.newAvatarUrl = item.isAnonymous == 1 ? (item.vestAvatar == null ? DEFAULT_AVATAR : item.vestAvatar) : item.poster.avatar;
			item.newNickname = item.isAnonymous == 1 ? (item.vestNickname == null ? DEFAULT_NICKNAME : item.vestNickname) : item.poster.nickname;
			item.LVVal = item.poster.usergroup.level + item.poster.usergroup.groupTitle;
			item.createTime = timeago(item.createTime);
			return {
				...item
			};
		});
		replyMoreList.value = newList;
		replyShow.value = true;
	}
};
const closeLook = () => {
	replyShow.value = false;
};
const lookMoreRA = () => {
	replyShow.value = true;
};
// 评论最新和最热切花
const orderTypeChange = (val) => {
	orderType.value = val;
	remarkData.value = [];
	pageNum.value = 1;
	remarkListFun(val);
};
// 对评论点赞
const postMsgLikeFun = async (item, id, val) => {
	// val 1 对帖子评论 2回复的评论
	let action = 1;
	if (val == 1) {
		action = item.isLiked == 1 ? 0 : 1;
	} else {
		action = val.isLiked == 1 ? 0 : 1;
	}
	const data = { action };
	const res = await postMsgLike(id, data);
	remarkData.value.forEach((ele) => {
		if (val == 1) {
			ele.likeNum = action == 1 ? ele.likeNum + 1 : ele.likeNum - 1;
		} else {
			ele.commentReplys.forEach((e) => {
				if (e.id == val.id) {
					e.likeNum = action == 1 ? e.likeNum + 1 : e.likeNum - 1;
				}
			});
		}
	});
};
// 获取置顶的评论
const getMessageInfoFun = async () => {
	const res = await getMessageInfo(remarkTopId.value, {});
	console.log(res, 999999);
	if (res.code == 0) {
		remarkTop.value = res.data;
	} else {
		remarkTopId.value = 0;
	}
};

// 去评论
const VestList = ref([]);
const showMsg = ref(false);
const anonymity = ref(false);
const vest = ref(false);
const vestID = ref(0);
const msgVal = ref(null);
const msgImg = ref(null);
const vestAvatar = ref(null);
const vestNickname = ref(null);
const commentId = ref(null);
const commentReplyId = ref(null);
const commentReplyUserId = ref(null);
const openMsgFun = () => {
	if (postItem.value.isEndPost == 1) return;
	showMsg.value = true;
};
const closeMsg = () => {
	showMsg.value = false;
	anonymity.value = false;
	vestID.value = 0;
	msgVal.value = '';
	msgImg.value = '';
	vestAvatar.value = '';
	vestNickname.value = '';
	commentId.value = '';
	commentReplyId.value = '';
	commentReplyUserId.value = '';
};
const openMsg = () => {};
// 发送评论
const sendMsg = async () => {
	// console.log(msgVal.value)
	const data = {
		departmentId: postSchool.value.schoolId,
		threadId: postId.value,
		commentId: commentId.value,
		commentReplyId: commentReplyId.value,
		commentReplyUserId: commentReplyUserId.value,
		content: msgVal.value,
		imageUrl: msgImg.value,
		userVest: vestID.value == 0 ? 0 : 1,
		vestAvatar: vestAvatar.value,
		vestNickname: vestNickname.value,
		isAnonymous: anonymity.value ? 1 : 0
	};
	const res = await postMsgAdd(data);
	// console.log(res)
	if (res.code == 0) {
		pageNum.value = 1;
		remarkData.value = [];
		remarkListFun(orderType.value);
		closeMsg();
	}
};
const delImg = () => {
	msgImg.value = '';
};
const uploadImg = async () => {
	const res = await uploadImage();
	if (res.code == 0) {
		msgImg.value = res.data.imgUrl;
	}
};
const vestChange = async (e) => {
	if (e) {
		const res = await userVest();
		if (res.code == 0) {
			VestList.value = res.data.list;
			vestID.value = res.data.list[0].id;
			// console.log(res)
		}
	} else {
		vestID.value = 0;
		vestNickname.value = null;
		vestAvatar.value = null;
	}
};
const vestClick = (item) => {
	vestID.value = item.id;
	vestNickname.value = item.vestNickname;
	vestAvatar.value = item.vestAvatar;
};
const ReplyFun = (item, num) => {
	if (num == 1) {
		commentId.value = item.id;
		commentReplyId.value = null;
		commentReplyUserId.value = null;
	} else {
		commentId.value = item.commentId;
		commentReplyId.value = item.id;
		commentReplyUserId.value = item.poster.id;
	}
	openMsgFun();
};

// 联系方式
const isHaveWay = ref(false);
const conWayData = ref({});
const conWayShow = ref(false);
const openConWay = () => {
	conWayShow.value = true;
};
const openConWayFun = () => {
	let contactTit = '手机号码：';
	let contactVal = '';
	if (postItem.value.contactPhone != '') {
		contactTit = '手机号码：';
		contactVal = postItem.value.contactPhone;
	}
	if (postItem.value.contactWechat != '') {
		contactTit = '微信号码：';
		contactVal = postItem.value.contactWechat;
	}
	if (postItem.value.contactQq != '') {
		contactTit = 'QQ号码：';
		contactVal = postItem.value.contactQq;
	}
	conWayData.value = {
		contactName: postItem.value.contactName,
		contactTit,
		contactVal
	};
	conWayShow.value = true;
};
const closeWay = () => {
	conWayShow.value = false;
};
const copyConWay = () => {
	const copyContent = `联系姓名：${conWayData.value.contactName}\n${conWayData.value.contactTit}${conWayData.value.contactVal}`;
	uni.setClipboardData({
		data: copyContent,
		success: () => {
			uni.showToast({
				title: '复制成功',
				icon: 'success'
			});
		},
		fail: () => {
			uni.showToast({
				title: '复制失败',
				icon: 'none'
			});
		}
	});
};
const makePhoneCall = (phoneNumber) => {
	if (!phoneNumber || !/^[0-9-]+$/.test(phoneNumber)) {
		uni.showToast({
			title: '电话号码无效',
			icon: 'none'
		});
		return;
	}
	// 判断平台
	if (uni.getSystemInfoSync().platform === 'devtools' || __wxConfig) {
		// 微信小程序环境
		uni.makePhoneCall({
			phoneNumber: phoneNumber,
			success: () => {
				console.log('拨打电话成功');
			},
			fail: (err) => {
				uni.showToast({
					title: '拨打电话失败',
					icon: 'none'
				});
				console.error('拨打电话失败:', err);
			}
		});
	} else {
		// H5环境
		if (/Android|iPhone|iPad|iPod/i.test(navigator.userAgent)) {
			// 移动设备
			window.location.href = `tel:${phoneNumber}`;
		} else {
			// PC端或其他设备
			uni.showModal({
				title: '提示',
				content: `是否要拨打电话 ${phoneNumber}?`,
				success: (res) => {
					if (res.confirm) {
						// 这里可以添加记录拨打电话的逻辑
						console.log('用户确认拨打电话:', phoneNumber);
					}
				}
			});
		}
	}
};

// 热点动画
const hotList = ref([]);
const animate = ref(false);
let timer = null;
const hotspotItem = (item) => {
	postId.value = item.id;
	getItem(); //获取帖子
};
const getHotList = async () => {
	const res = await hotPost();
	// console.log(res)
	if (res.code == 0) {
		hotList.value = res.data.list;
	}
	if (timer) clearInterval(timer);
	timer = setInterval(() => {
		animateFun();
	}, 4000);
};
const animateFun = () => {
	animate.value = true;
	setTimeout(() => {
		hotList.value.push(hotList.value[0]);
		hotList.value.shift();
		animate.value = false;
	}, 500);
};

// 导航
const show = ref(false);
const open = () => {};
const close = () => {
	show.value = false;
};
const goPublish = (val) => {
	close();
	uni.navigateTo({
		url: `/pages/publish/index?val=${val}`
	});
};
const openPublish = () => {
	console.log(1231);
	show.value = true;
};

// 去分享
const goShare = (id) => {
	uni.navigateTo({
		url: `/post/share/index?url=${id}`
	});
};

// 去消息
const goMessage = () => {
	uni.switchTab({
		url: `/pages/message/index`
	});
};
// 去首页
const goIndex = () => {
	uni.switchTab({
		url: `/pages/index/index`
	});
};

onReachBottom(() => {
	if (remarkData.value.length >= total.value) {
		console.log('没有更多内容了');
	} else {
		pageNum.value++;
		remarkListFun(orderType.value);
	}
});
</script>

<style lang="scss">
@import '@/uni_modules/uview-plus/theme.scss';
page {
	background: #f8f8fa;
}
.noData {
	width: 100%;
	color: #999;
	text-align: center;
}
.postDetails {
	padding-top: 10rpx;
	image {
		width: 100%;
		height: 100%;
	}
	.postItem {
		padding: 30rpx;
		background: #fff;
		.postItemUser {
			justify-content: space-between;
			align-items: center;
			.PIUL {
				align-items: center;
				.PIULT {
					margin-right: 20rpx;
					width: 70rpx;
					height: 70rpx;
					border-radius: 50%;
					overflow: hidden;
					background-color: #6f7d8c;
					image {
						width: 100%;
						height: 100%;
					}
				}
				.PIULUN {
					.PIULN {
						font-weight: bold;
						font-size: 24rpx;
						color: #333;
					}
					.PIULLV {
						font-weight: 500;
						font-size: 20rpx;
						color: #999999;
					}
				}
			}
			.PIUR {
				.PIURP {
					margin-right: 30rpx;
					width: 44rpx;
					height: 44rpx;
					image {
						width: 100%;
						height: 100%;
					}
				}
				.PIURT {
					font-size: 24rpx;
					color: #999999;
				}
				.PIURM {
					margin-left: 20rpx;
					width: 40rpx;
					height: 40rpx;
					image {
						width: 100%;
						height: 100%;
					}
				}
			}
		}
		.warning {
			padding: 20rpx 30rpx;
			margin-left: -30rpx;
			margin-top: 20rpx;
			width: 750rpx;
			font-size: 28rpx;
			background-color: #fdf7eb;
			color: #e18417;
		}
		.postItemConT {
			position: relative;
			padding-top: 20rpx;
			.posType {
				position: absolute;
				top: 22rpx;
				left: 0;
				.postTypeI {
					margin-right: 15rpx;
					width: 58rpx;
					height: 32rpx;
				}
				.postTypeH {
					width: 36rpx;
					height: 36rpx;
				}
			}
			.posCon {
				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 2;
				overflow: hidden;
				text-overflow: ellipsis;
				font-weight: 500;
				font-size: 32rpx;
				color: #222222;
			}
			.posConS {
				width: 100%;
				height: 45rpx;
			}
			.TI3 {
				//三个
				text-indent: 200rpx;
			}
			.TI2 {
				//两个长
				text-indent: 137rpx;
			}
			.TI1 {
				//一个长
				text-indent: 62rpx;
			}
			.TI4 {
				//一个短
				text-indent: 50rpx;
			}
			.TI0 {
				//一长一短
				text-indent: 110rpx;
			}
		}
		.postItemConC {
			padding: 20rpx 0;
			.postItemConCV {
				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 3;
				overflow: hidden;
				font-weight: 400;
				font-size: 26rpx;
				color: #666;
			}
		}
		.postItemImg {
			flex-wrap: wrap;
			row-gap: 20rpx;
			column-gap: 20rpx;
			padding-top: 16rpx;
			width: 100%;
			overflow: hidden;
			.postItemImgD {
				width: 152rpx;
				height: 152rpx;
				overflow: hidden;
				border-radius: 10rpx;
				background: #6f7d8c;
				image {
					width: 100%;
					height: 100%;
				}
			}
		}
		.adminBut {
			padding-top: 20rpx;
			.adminBT {
				margin-right: 30rpx;
				width: 150rpx;
				height: 60rpx;
				line-height: 60rpx;
				text-align: center;
				border-radius: 30rpx;
				font-size: 26rpx;
				background: linear-gradient(135deg, #5452e2 0%, #547fec 100%);
				color: #fff;
			}
			.adminBU {
				width: 150rpx;
				height: 60rpx;
				line-height: 60rpx;
				text-align: center;
				border-radius: 30rpx;
				font-size: 26rpx;
				background: linear-gradient(135deg, #fea60f 0%, #fcd60e 100%);
				color: #fff;
			}
		}
		.postItembot {
			justify-content: space-between;
			align-items: center;
			padding-top: 20rpx;
			.pIBL {
				align-items: center;
				.pIBL1 {
					padding: 8rpx 16rpx;
					background: #fff6ed;
					border-radius: 8rpx;
					font-size: 20rpx;
					color: #f39f4b;
				}
				.pIBL2 {
					margin-left: 20rpx;
					font-size: 20rpx;
					color: #bcbfc3;
				}
			}
			.pIBR {
				.pIBRI {
					flex-direction: column;
					align-items: center;
					margin-left: 40rpx;
					.pIBRII {
						width: 36rpx;
						height: 36rpx;
						image {
							width: 100%;
							height: 100%;
						}
					}
					.pIBRIT {
						font-weight: 400;
						font-size: 20rpx;
						color: #999999;
					}
				}
			}
		}
		.hotspot {
			margin-top: 30rpx;
			padding: 12rpx;
			width: 100%;
			height: 116rpx;
			background: #f4f5fe;
			border-radius: 16rpx;
			overflow: hidden;
			.hotspotTit {
				.hotspotTitL {
					image {
						width: 40rpx;
						height: 40rpx;
					}
				}
				.hotspotTitR {
					margin-left: 8rpx;
					font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
					font-weight: 400;
					font-size: 28rpx;
					color: #000000;
				}
			}
			.hotspotConDom {
				height: 32rpx;
				overflow: hidden;
				.hotspotCon {
					.hotspotItem {
						margin-bottom: 20rpx;
						font-weight: 500;
						font-size: 24rpx;
						color: #6f7d8c;
					}
				}
				.marginTopTrue {
					margin-top: -30rpx;
					transition: all 0.5s;
				}
				.marginTopFalse {
					margin-top: 0rpx;
				}
			}
		}
	}
	.postAdv {
		margin-top: 10rpx;
		padding: 30rpx;
		background-color: #fff;
		.postAdvItem {
			justify-content: space-between;
			align-items: center;
			margin-bottom: 20rpx;
			.adL {
				.adLT {
					width: 76rpx;
					height: 76rpx;
					background: #ccc;
				}
				.adLR {
					flex-direction: column;
					justify-content: space-between;
					padding-left: 30rpx;
					.adLRT {
						font-weight: 500;
						font-size: 24rpx;
						color: #222222;
					}
					.adLRB {
						font-weight: 500;
						font-size: 20rpx;
						color: #999999;
					}
				}
			}
			.adR {
				width: 136rpx;
				height: 58rpx;
				line-height: 58rpx;
				text-align: center;
				background: #ebf0ff;
				border-radius: 40rpx;
				font-weight: 500;
				font-size: 24rpx;
				color: #4f77e0;
			}
		}
		.postAItem {
			margin-bottom: 20rpx;
			width: 690rpx;
			height: 112rpx;
			border-radius: 8rpx;
			background-color: #319dd7;
		}
	}
	.remark {
		// padding: 30rpx;
		padding-bottom: 150rpx;
		background: #fff;
		.remarkTit {
			padding: 30rpx;
			background: #f8f8fa;
			justify-content: space-between;
			align-items: center;
			.remarkTitL {
				font-weight: bold;
				font-size: 28rpx;
				color: #000000;
				line-height: 42rpx;
			}
			.remarkTitR {
				.rHotI {
					width: 28rpx;
					height: 28rpx;
					image {
						width: 100%;
						height: 100%;
					}
				}
				.rHI {
					padding: 0 20rpx;
					color: #bebebe;
				}
				.rHotT {
					margin-left: 10rpx;
					padding-top: 5rpx;
					font-size: 24rpx;
					color: #999999;
				}
				.act {
					font-weight: 500;
					font-size: 26rpx;
					color: #000;
				}
				.rActive {
					color: #000000;
				}
			}
		}
		.remarkList {
			margin-top: 15rpx;
			padding: 60rpx;
			padding-top: 20rpx;
			background-color: #fff;
			.remarkItem {
				.rIUser {
					justify-content: space-between;
					align-items: center;
					.rIUserL {
						.rIUserLA {
							width: 70rpx;
							height: 70rpx;
							border-radius: 50%;
							overflow: hidden;
							image {
								width: 100%;
								height: 100%;
							}
						}
						.rIUserLI {
							margin-left: 10rpx;
							.rIUserLIName {
								font-size: 28rpx;
								color: #666666;
								line-height: 42rpx;
								.isAuthorD {
									font-size: 24rpx;
									color: #666666;
								}
							}
							.rIUserLILV {
								font-weight: 500;
								font-size: 20rpx;
								color: #9ea4b7;
							}
						}
					}
					.rIUserR {
						.rIURT {
							margin-right: 48rpx;
							font-weight: 500;
							font-size: 20rpx;
							color: #999999;
						}
						.rIURZ {
							.rIURZI {
								margin-top: -5rpx;
								width: 27.74rpx;
								height: 27.74rpx;
								image {
									width: 100%;
									height: 100%;
								}
							}
							.rIURZN {
								margin-left: 12rpx;
								// #/* #ifdef MP-WEIXIN */
								padding-top: 2rpx;
								// /* #endif */
								font-size: 24rpx;
								color: #000000;
							}
						}
						.rIURM {
							margin-left: 30rpx;
							width: 40rpx;
							height: 40rpx;
							image {
								width: 100%;
								height: 100%;
							}
						}
					}
				}
				.rICon {
					margin: 10rpx 0;
					padding-left: 80rpx;
					font-size: 28rpx;
					color: #000000;
					.rIConI {
						width: 175rpx;
						height: 175rpx;
						border-radius: 10rpx;
						overflow: hidden;
						image {
							width: 100%;
							height: 100%;
						}
					}
					.rTime {
						padding: 10rpx;
						padding-left: 0;
						font-size: 22rpx;
						color: #666;
						.reply {
							margin-left: 20rpx;
							color: #555;
						}
					}
				}
				.rCList {
					padding-left: 75rpx;
					padding-bottom: 20rpx;
					background: #fafafa;
					border-radius: 8rpx;
					.rCItem {
						.rIUser {
							justify-content: space-between;
							align-items: center;
							padding: 20rpx 0;
							.rIUserL {
								.rIUserLA {
									width: 70rpx;
									height: 70rpx;
									border-radius: 50%;
									overflow: hidden;
									image {
										width: 100%;
										height: 100%;
									}
								}
								.rIUserLI {
									margin-left: 10rpx;
									.rIUserLIName {
										font-size: 28rpx;
										color: #666666;
										line-height: 42rpx;
										.isAuthorD {
											font-size: 24rpx;
											color: #666666;
										}
									}
									.rIUserLILV {
										font-weight: 500;
										font-size: 20rpx;
										color: #9ea4b7;
									}
								}
							}
							.rIUserR {
								.rIURT {
									margin-right: 48rpx;
									font-weight: 500;
									font-size: 20rpx;
									color: #999999;
								}
								.rIURZ {
									.rIURZI {
										margin-top: -5rpx;
										width: 27.74rpx;
										height: 27.74rpx;
										image {
											width: 100%;
											height: 100%;
										}
									}
									.rIURZN {
										margin-left: 12rpx;
										// #/* #ifdef MP-WEIXIN */
										padding-top: 2rpx;
										// /* #endif */
										font-size: 24rpx;
										color: #000000;
									}
								}
								.rIURM {
									margin-left: 30rpx;
									width: 40rpx;
									height: 40rpx;
									image {
										width: 100%;
										height: 100%;
									}
								}
							}
						}
						.rCICon {
							font-size: 28rpx;
							color: #000000;
							.rIConI {
								width: 175rpx;
								height: 175rpx;
								border-radius: 10rpx;
								overflow: hidden;
								image {
									width: 100%;
									height: 100%;
								}
							}
							.rTime {
								padding: 10rpx;
								padding-left: 0;
								font-size: 22rpx;
								color: #666;
								.reply {
									margin-left: 20rpx;
									color: #555;
								}
							}
						}
					}
					.rCItemMore {
						line-height: 50rpx;
						color: #999;
						font-size: 24rpx;
					}
				}
			}
		}
	}
	.msgInput {
		position: fixed;
		bottom: 0;
		left: 0;
		padding: 24rpx 30rpx;
		width: 100%;
		height: 120rpx;
		background: #ffffff;
		box-shadow: 0rpx -2rpx 4rpx 0rpx rgba(0, 0, 0, 0.1);
		.inUser {
			width: 72rpx;
			height: 72rpx;
			border-radius: 50%;
			overflow: hidden;
			image {
				width: 100%;
				height: 100%;
			}
		}
		.inText {
			margin-left: 20rpx;
			padding-left: 20rpx;
			width: 602rpx;
			height: 72rpx;
			line-height: 72rpx;
			background: #f7f7f7;
			border-radius: 40rpx;
			font-size: 28rpx;
			color: #999999;
		}
	}
	.nav {
		position: fixed;
		flex-direction: column;
		align-items: center;
		padding: 30rpx 15rpx;
		right: 30rpx;
		bottom: 150rpx;
		background: rgba(0, 0, 0, 0.6);
		color: #fff;
		border-radius: 10rpx;
		.navItem {
			flex-direction: column;
			align-items: center;
			margin-bottom: 30rpx;
			font-size: 26rpx;
		}
		.navItem:last-child {
			margin-bottom: 0;
		}
	}
	/* 发布帖子弹窗 */
	.popupDom {
		/* height: 600rpx; */
		border-radius: 20rpx;
		background: #f7f8fa;
		overflow: hidden;
		.popupDomCh {
			margin-bottom: 15rpx;
			width: 100%;
			/* height: calc(600rpx - 105rpx); */
			background: #fff;
		}
		.titleP {
			width: 100%;
			font-size: 35rpx;
			line-height: 100rpx;
			text-align: center;
			font-weight: 700;
		}
		.pushList {
			width: 100%;
		}
		.pushItem {
			margin-bottom: 15rpx;
			justify-content: space-between;
			align-items: center;
			height: 140rpx;
			background: #edf9dd;
			border-radius: 10rpx;
			overflow: hidden;
		}
		.pItemL {
			margin-right: 45rpx;
			height: 100%;
		}
		.pItemR {
			flex-direction: column;
			justify-content: center;
			align-items: flex-start;
			/* #ifdef MP-WEIXIN */
			padding-top: 15rpx;
			/* #endif */
			height: 100%;
		}
		.pItemRT {
			font-size: 35rpx;
			color: #555555;
		}
		.colorP {
			background: #eff4ff;
		}
		.colorC {
			background: #fff9ef;
		}
		.pItemRB {
			padding-top: 10rpx;
			font-size: 24rpx;
			color: #787878;
		}
		image {
			width: 100rpx;
		}
		.closeP {
			line-height: 105rpx;
			text-align: center;
			background: #fff;
		}
	}
	/* 评论弹窗 */
	.popMsg {
		padding: 30rpx;
		width: 100%;
		overflow: hidden;
		.popMsgII {
			justify-content: space-between;
			align-items: center;
			width: 100%;
			.popMsgIIR {
				width: 110rpx;
				height: 60rpx;
				line-height: 60rpx;
				border-radius: 30rpx;
				text-align: center;
				font-size: 26rpx;
				color: #fff;
				background-color: #8dccf6;
			}
			.MsgActive {
				background-color: #1b9aee !important;
			}
		}
		.msgVal {
			position: relative;
			margin: 20rpx;
			width: 650rpx;
			height: 300rpx;
			border-radius: 20rpx;
			background: #f3f3f3;
			.textVal {
				textarea {
					width: 100%;
					height: 120rpx;
				}
			}
			.msgImg {
				position: absolute;
				left: 20rpx;
				bottom: 10rpx;
				justify-content: center;
				align-items: center;
				width: 150rpx;
				height: 150rpx;
				border-radius: 20rpx;
				background: #f7f8fa;
				.offImg {
					position: absolute;
					right: 0;
					top: 0;
					width: 40rpx;
					height: 40rpx;
					line-height: 30rpx;
					font-size: 26rpx;
					text-align: center;
					border-radius: 0rpx 10rpx 0rpx 40rpx;
					background: #000;
					color: #fff;
				}
			}
		}
		.VestList {
			margin-bottom: 20rpx;
			width: 650rpx;
			height: 120rpx;
			overflow-x: auto;
			white-space: nowrap;
			-webkit-overflow-scrolling: touch;
			.VestItem {
				flex-direction: column;
				justify-content: center;
				align-items: center;
				width: 120rpx;
				height: 120rpx;
				.VestI {
					width: 70rpx;
					height: 70rpx;
					border-radius: 50%;
					background: #319dd7;
					overflow: hidden;
				}
				.VestName {
					font-size: 26rpx;
				}
			}
			.VestACtive {
				border: 2rpx solid #1b9aee;
			}
		}
	}
	/* 举报 */
	.report {
		width: 100%;
		.repTit {
			width: 100%;
			line-height: 80rpx;
			text-align: center;
		}
		.reportVal {
			margin: auto;
			width: 90%;
			height: 150rpx;
			border-radius: 15rpx;
			background-color: #f3f3f3;
			textarea {
				width: 100%;
				height: 100%;
			}
		}
		.reportBut {
			justify-content: flex-end;
			width: 100%;
			.butR {
				width: 110rpx;
				height: 60rpx;
				line-height: 60rpx;
				border-radius: 30rpx;
				text-align: center;
				font-size: 26rpx;
				color: #fff;
				background-color: #1b9aee;
			}
		}
	}
	/* 联系方式 */
	.contactWay {
		width: 100%;
		.wayTit {
			justify-content: space-between;
			align-items: center;
			padding: 20rpx;
			width: 100%;
			line-height: 80rpx;
			.wayTC {
				font-size: 28rpx;
				color: #000000;
				line-height: 36rpx;
			}
			.wayTR {
				font-size: 28rpx;
				color: #4f77e0;
				line-height: 36rpx;
			}
		}
		.wayCon {
			margin: auto;
			margin-bottom: 30rpx;
			padding: 30rpx;
			width: 670rpx;
			height: 162rpx;
			background: #f4f5fe;
			border-radius: 16rpx;
			.wayConItem {
				margin-bottom: 32rpx;
				font-size: 28rpx;
				color: #999999;
				line-height: 36rpx;
				.wCIR {
					font-size: 28rpx;
					color: #000000;
					line-height: 36rpx;
				}
			}
		}
	}
	.adminBut {
		position: fixed;
		right: 30rpx;
		bottom: 570rpx;
		width: 80rpx;
		height: 80rpx;
		line-height: 80rpx;
		text-align: center;
		border-radius: 50%;
		background-color: #22a5f1;
		color: #fff;
		font-size: 26rpx;
	}
}
.replyShow {
	margin-top: 20rpx;
	width: 100%;
	max-height: 75vh;
	min-height: 45vh;
	background-color: #fff;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch; /* 启用硬件加速滚动 */
	.remarkItem {
		.rIUser {
			justify-content: space-between;
			align-items: center;
			.rIUserL {
				.rIUserLA {
					width: 70rpx;
					height: 70rpx;
					border-radius: 50%;
					overflow: hidden;
					image {
						width: 100%;
						height: 100%;
					}
				}
				.rIUserLI {
					margin-left: 10rpx;
					.rIUserLIName {
						font-size: 28rpx;
						color: #666666;
						line-height: 42rpx;
						.isAuthorD {
							font-size: 24rpx;
							color: #666666;
						}
					}
					.rIUserLILV {
						font-weight: 500;
						font-size: 20rpx;
						color: #9ea4b7;
					}
				}
			}
			.rIUserR {
				.rIURT {
					margin-right: 48rpx;
					font-weight: 500;
					font-size: 20rpx;
					color: #999999;
				}
				.rIURZ {
					.rIURZI {
						margin-top: -5rpx;
						width: 27.74rpx;
						height: 27.74rpx;
						image {
							width: 100%;
							height: 100%;
						}
					}
					.rIURZN {
						margin-left: 12rpx;
						// #/* #ifdef MP-WEIXIN */
						padding-top: 2rpx;
						// /* #endif */
						font-size: 24rpx;
						color: #000000;
					}
				}
				.rIURM {
					margin-left: 30rpx;
					width: 40rpx;
					height: 40rpx;
					image {
						width: 100%;
						height: 100%;
					}
				}
			}
		}
		.rICon {
			margin: 20rpx 0;
			padding-left: 80rpx;
			font-size: 28rpx;
			color: #000000;
			.rIConI {
				width: 175rpx;
				height: 175rpx;
				border-radius: 10rpx;
				overflow: hidden;
				image {
					width: 100%;
					height: 100%;
				}
			}
			.rTime {
				padding: 20rpx;
				padding-left: 0;
				font-size: 22rpx;
				color: #666;
				.reply {
					margin-left: 20rpx;
					color: #555;
				}
			}
		}
		.rCList {
			padding-left: 80rpx;
			padding-bottom: 20rpx;
			background: #fafafa;
			border-radius: 8rpx;
			.rCItem {
				.rIUser {
					justify-content: space-between;
					align-items: center;
					padding: 20rpx 0;
					.rIUserL {
						.rIUserLA {
							width: 70rpx;
							height: 70rpx;
							border-radius: 50%;
							overflow: hidden;
							image {
								width: 100%;
								height: 100%;
							}
						}
						.rIUserLI {
							margin-left: 10rpx;
							.rIUserLIName {
								font-size: 28rpx;
								color: #666666;
								line-height: 42rpx;
								.isAuthorD {
									font-size: 24rpx;
									color: #666666;
								}
							}
							.rIUserLILV {
								font-weight: 500;
								font-size: 20rpx;
								color: #9ea4b7;
							}
						}
					}
					.rIUserR {
						.rIURT {
							margin-right: 48rpx;
							font-weight: 500;
							font-size: 20rpx;
							color: #999999;
						}
						.rIURZ {
							.rIURZI {
								margin-top: -5rpx;
								width: 27.74rpx;
								height: 27.74rpx;
								image {
									width: 100%;
									height: 100%;
								}
							}
							.rIURZN {
								margin-left: 12rpx;
								// #/* #ifdef MP-WEIXIN */
								padding-top: 2rpx;
								// /* #endif */
								font-size: 24rpx;
								color: #000000;
							}
						}
						.rIURM {
							margin-left: 30rpx;
							width: 40rpx;
							height: 40rpx;
							image {
								width: 100%;
								height: 100%;
							}
						}
					}
				}
				.rCICon {
					font-size: 28rpx;
					color: #000000;
					.rIConI {
						width: 175rpx;
						height: 175rpx;
						border-radius: 10rpx;
						overflow: hidden;
						image {
							width: 100%;
							height: 100%;
						}
					}
					.rTime {
						padding: 20rpx;
						padding-left: 0;
						font-size: 22rpx;
						color: #666;
						.reply {
							margin-left: 20rpx;
							color: #555;
						}
					}
				}
			}
			.rCItemMore {
				line-height: 50rpx;
				color: #999;
				font-size: 24rpx;
			}
		}
	}
}
.custom_btn {
	height: 70rpx;
	line-height: 70rpx;
	border-radius: 35rpx;
	text-align: center;
	color: #fff;
	background-color: #3391e6;
}
.borB {
	margin-bottom: 20rpx;
	border-bottom: 2rpx solid #e6e6e6;
}
</style>
